package com.trgis.zhejiangimg;

/**
 * 2022/8/23
 * 瓦片每一层的信息
 * @author fengyu
 */
public class TileLevelInfo {
    /**
     * 层标识名称
     */
    private int level;

    /**
     * 瓦片最小行号
     */
    private int minRow;
    private int maxRow;

    /**
     * 瓦片最小列号
     */
    private int minCol;
    private int maxCol;

    public TileLevelInfo(int level, int minRow, int maxRow, int minCol, int maxCol){
        this.level = level;
        this.minCol = minCol;
        this.minRow = minRow;
        this.maxCol = maxCol;
        this.maxRow = maxRow;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public int getMinRow() {
        return minRow;
    }

    public void setMinRow(int minRow) {
        this.minRow = minRow;
    }

    public int getMaxRow() {
        return maxRow;
    }

    public void setMaxRow(int maxRow) {
        this.maxRow = maxRow;
    }

    public int getMinCol() {
        return minCol;
    }

    public void setMinCol(int minCol) {
        this.minCol = minCol;
    }

    public int getMaxCol() {
        return maxCol;
    }

    public void setMaxCol(int maxCol) {
        this.maxCol = maxCol;
    }

    public Long getCount(){
        return (long) (maxRow - minRow + 1) * (maxCol - minCol + 1);
    }
}
